<?php
/**
 * Created by Silent Night.
 * User: Silent Night
 * Date: 2017/9/26
 * Time: 11:13
 */

namespace app\api\controller;

use think\cache\driver\Redis;
use think\Controller;

use app\api\model;
use think\Exception;
use think\Route;
use \think\response\Json;


class Test extends Controller
{


    /**
     * 测试关闭订单
     */
    public function test1()
    {
        $a = getSystemConfigForVarname("a");
        print_r($a);
        $config = getAllSystemConfig();
        print_r($config);
    }

    public function test2()
    {
        $list = array(
            ['id' => 1, "name" => "wangw1"],
            ['id' => 2, "name" => "wangw2"],
            ['id' => 3, "name" => "wangw3"],
            ['id' => 4, "name" => "wangw4"],
        );
        $ids = "3,2,1,4";
        $array = listsForSorts($list, $ids);
        print_r($array);
    }

    public function test3()
    {
        $model = new \app\admin\model\Sysconfig();
        $lists = $model ->getDataForWhere(" (varname='a' or varvalue>90) and id>1");
        print_r($lists);
    }

    public function ttt()
    {
        queue("aa","wangwu");

    }
}